<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
		  var birth=prompt('请输入出生年份');
		  
		  var age=2021-birth;      //减法 隐式转换
		  alert('你到年龄为'+age+'岁');
		</script>
	</head>
	<body>
	</body>
</html>
